package cn.zust.itcost.controller;

import cn.zust.itcost.service.ResumeInferenceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Api(tags = "简历推理接口")
@RestController
@RequestMapping("/api/resume/inference")
public class ResumeInferenceController {

    @Autowired
    private ResumeInferenceService resumeInferenceService;

    @ApiOperation("分析职业发展路径")
    @GetMapping("/{resumeId}/career-path")
    public ResponseEntity<Map<String, Object>> analyzeCareerPath(@PathVariable Long resumeId) {
        return ResponseEntity.ok(resumeInferenceService.analyzeCareerPath(resumeId));
    }

    @ApiOperation("分析技能关联")
    @GetMapping("/{resumeId}/skill-relations")
    public ResponseEntity<Map<String, Object>> analyzeSkillRelations(@PathVariable Long resumeId) {
        return ResponseEntity.ok(resumeInferenceService.analyzeSkillRelations(resumeId));
    }

    @ApiOperation("分析行业洞察")
    @GetMapping("/{resumeId}/industry-insights")
    public ResponseEntity<Map<String, Object>> analyzeIndustryInsights(@PathVariable Long resumeId) {
        return ResponseEntity.ok(resumeInferenceService.analyzeIndustryInsights(resumeId));
    }

    @ApiOperation("获取技能提升建议")
    @GetMapping("/{resumeId}/skill-upgrade")
    public ResponseEntity<Map<String, Object>> getSkillUpgradeSuggestions(
            @PathVariable Long resumeId,
            @RequestParam String targetPosition) {
        return ResponseEntity.ok(resumeInferenceService.getSkillUpgradeSuggestions(resumeId, targetPosition));
    }
} 